﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace SqlSugar.Template.Extensions
{
    public class CryptographyHelper
    {
        public static string GetMD5Hash(string input)
        {                    
                var md5 = new MD5CryptoServiceProvider();
                byte[] bytes = Encoding.Default.GetBytes(input);
                string md5Value = BitConverter.ToString(md5.ComputeHash(bytes), 4, 8);
                md5Value = md5Value.Replace("-", "");
     return md5Value;
        }
    }
}
